<!DOCTYPE html>
<html>
  <head>
  <meta charset='UTF-8'>
  <title>Atom API Documentation</title>
  <link rel='stylesheet' href='../assets/biscotto.css' type='text/css'>
  <script src='../assets/biscotto.js'></script>
  <script src='../assets/search_data.js'></script>
</head>
  <body>
    <div id='base' data-path='..&#47;'></div>
<div id='header'>
  <div id='menu'>
    <a href='../docs/README.md.html' title='Atom'>Atom</a>
    &raquo;
    <a href='../class_index.html' title='Index'>Index</a>
    &raquo;
    <span class='title'>File</span>
    <nav>
      <ul>
        <li class='noframes'>
          (<a class='noframes' href='File.html#'>no frames</a>)
        </li>
      </ul>
    </nav>
    <div id='search'>
      <a id='class_list_link' href='../class_list.html'>Classes</a>
      <a id='file_list_link' href='../file_list.html'>Files</a>
      <a id='method_list_link' href='../method_list.html'>Methods</a>
      <a id='extra_list_link' href='../extra_list.html'>Extras</a>
    </div>
  </div>
  <iframe id='search_frame'></iframe>
  <div id='fuzzySearch'>
    <input type='text'>
    <ol></ol>
  </div>
  <div id='help'>
    <p>
      Quickly fuzzy find classes, mixins, methods, file:
    </p>
    <ul>
      <li>
        <span>Ctrl-T</span>
        Open fuzzy finder dialog
      </li>
    </ul>
    <p>
      In frame mode you can toggle the list naviation frame on the left side:
    </p>
    <ul>
      <li>
        <span>Ctrl-L</span>
        Toggle list view
      </li>
    </ul>
    <p>
      You can focus a list in frame mode or toggle a tab in frameless mode:
    </p>
    <ul>
      <li>
        <span>Ctrl-C</span>
        Class list
      </li>
      <li>
        <span>Ctrl-I</span>
        Mixin list
      </li>
      <li>
        <span>Ctrl-F</span>
        File list
      </li>
      <li>
        <span>Ctrl-M</span>
        Method list
      </li>
      <li>
        <span>Ctrl-E</span>
        Extras list
      </li>
    </ul>
    <p>
      You can focus and blur the search input:
    </p>
    <ul>
      <li>
        <span>Ctrl-S</span>
        Focus search input
      </li>
      <li>
        <span>Esc</span>
        Blur search input
      </li>
    </ul>
    <p>
      In frameless mode you can close the list tab:
    </p>
    <ul>
      <li>
        <span>Esc</span>
        Close list tab
      </li>
    </ul>
  </div>
</div>
    <div id='content'>
      <h1>
        Class
        File
      </h1>
      <div class='stability-1'>
        <span class='heading'></span>
        <div class='message'></div>
      </div>
      <table class='box'>
        <tr>
          <td>Defined in:</td>
          <td>docs&#47;includes&#47;node-pathwatcher&#47;src&#47;file.coffee</td>
        </tr>
      </table>
      <h2>Overview</h2>
      <div class='docstring'>
  <p>Represents an individual file that can be watched, read from, and written to.</p>
</div>
<div class='tags'>
</div>
      <h2>Instance Method Summary</h2>
      <ul class='summary'>
  <li>
    <span class='signature'>
      <a href='File.html#constructor-instance'>
        ::<strong>constructor</strong>(path, symlink = false)
      </a>
    </span>
    <span class='desc'>
      Creates a new file.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='File.html#exists-instance'>
        ::<strong>exists</strong>()
      </a>
    </span>
    <span class='desc'>
      Returns whether the file exists.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='File.html#getBaseName-instance'>
        ::<strong>getBaseName</strong>()
      </a>
    </span>
    <span class='desc'>
      Return the <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> filename without any directory information.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='File.html#getDigest-instance'>
        ::<strong>getDigest</strong>()
      </a>
    </span>
    <span class='desc'>
      Get the SHA-1 digest of this file
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='File.html#getPath-instance'>
        ::<strong>getPath</strong>()
      </a>
    </span>
    <span class='desc'>
      Returns the <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> path for the file.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='File.html#read-instance'>
        ::<strong>read</strong>(flushCache)
      </a>
    </span>
    <span class='desc'>
      Reads the contents of the file.
    </span>
  </li>
  <li>
    <span class='signature'>
      <a href='File.html#write-instance'>
        ::<strong>write</strong>(text)
      </a>
    </span>
    <span class='desc'>
      Overwrites the file with the given String.
    </span>
  </li>
</ul>
      <h2>Constructor Details</h2>
      <div class='methods'>
  <div class='method_details'>
    <p class='signature' id='constructor-instance'>
      ::<strong>constructor</strong>(path, symlink = false)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Creates a new file.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(String)</span>
      <span class='name'>path</span>
      &mdash;
      <span class='desc'>A <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> containing the absolute path to the file</span>
    </li>
    <li>
      <span class='type'>(Boolean)</span>
      <span class='name'>symlink</span>
      &mdash;
      <span class='desc'>A <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean'>Boolean</a> indicating if the path is a symlink (default: false).</span>
    </li>
  </ul>
</div>
  </div>
</div>
      <h2>Instance Method Details</h2>
      <div class='methods'>
  <div class='method_details'>
    <p class='signature' id='exists-instance'>
      ::<strong>exists</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns whether the file exists.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getBaseName-instance'>
      ::<strong>getBaseName</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Return the <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> filename without any directory information.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getDigest-instance'>
      ::<strong>getDigest</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Get the SHA-1 digest of this file</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='getPath-instance'>
      ::<strong>getPath</strong>()
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Returns the <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String'>String</a> path for the file.</p>
</div>
<div class='tags'>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='read-instance'>
      ::<strong>read</strong>(flushCache)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Reads the contents of the file.</p>
</div>
<div class='tags'>
  <h3>Parameters:</h3>
  <ul class='param'>
    <li>
      <span class='type'>(Boolean)</span>
      <span class='name'>flushCache</span>
      &mdash;
      <span class='desc'>A <a href='https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Boolean'>Boolean</a> indicating whether to require a direct read or if a cached copy is acceptable.</span>
    </li>
  </ul>
  <h3>Returns:</h3>
  <ul class='return'>
    <li>
      <span class='type'></span>
      <span class='desc'>Returns a promise that resovles to a String.</span>
    </li>
  </ul>
</div>
  </div>
  <div class='method_details'>
    <p class='signature' id='write-instance'>
      ::<strong>write</strong>(text)
      <a class='gh-link' href='https://github.com/atom/atom'>Source</a>
    </p>
    <div class='docstring'>
  <p>Overwrites the file with the given String.</p>
</div>
<div class='tags'>
</div>
  </div>
</div>
    </div>
    <div id='footer'>
  Generated on
  Wed Feb 26 2014 17:43:10 GMT-0800 (PST)
  by
  <a href='https://github.com/gjtorikian/biscotto' title='TomDoc-CoffeeScript API documentation generator'>Biscotto</a>
  v2.1.0
  (Node.js v0.10.21).
  &#10034;
  Press Ctrl-h to see the keyboard shortcuts
</div>
  </body>
</html>